package com.itheima;

public class Student {
    private String name;
    private int age;
    private int score;

    public void setName(String name){
        this.name = name;
    }
    public void setAge(int age){
        this.age = age;
    }
    public void setScore(int score){
        if(score < 0 || score > 100){
            System.out.println("成绩不合法");
            return;
        }
        this.score = score;
    }
    public String getName(){
        return name;
    }
    public int getAge(){
        return age;
    }
    public int getScore(){
        return score;
    }

    public Student(){
        this.name = "张三";
        this.age = 16;
        this.score = 77;
    }
}
